package cn.skyquant.quant4j.service.boot.model.strategy;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface StrategyTestCloseRepository extends CrudRepository<StrategyTestClose, Integer> {

    @Modifying
    @Query("delete from StrategyTestClose u where u.test.id = ?1")
    void deleteByTestId(int testId);

    List<StrategyTestClose> findByTestId(int testId);
}
